package game.tileMap.view
{
	import game.tileMap.model.Troop;
	
	/**
	 *玩家控制队伍的类 
	 * @author ganweida
	 * 
	 */
	public class PartySet
	{
		public var members:Array
		public var troop:Troop;
		public var ctrl:Boolean=true;
		public function PartySet(troop:Troop)
		{
			members=[];
			this.troop=troop;
			init()
		}
		
		protected function init():void{
			for (var i:int;i<troop.members.length;i++){
				var playerView:PlayerView=new PlayerView(troop.members[i]);
					members.push(playerView);
			}
		}
		
		
		public function  moveUp():void{
			for (var i:int;i<members.length;i++){
				var player:PlayerView=members[i];
				player.myVo.isEnd=true;
				player.moveUp();
			}
		}
		public function  moveDown():void{
			for (var i:int;i<members.length;i++){
				var player:PlayerView=members[i];
				player.myVo.isEnd=true;
				player.moveDown();
			}
		}
		public function  moveLeft():void{
			for (var i:int;i<members.length;i++){
				var player:PlayerView=members[i];
				player.myVo.isEnd=true;
				player.moveLeft();
			}
		}
		public function  moveRight():void{
			for (var i:int;i<members.length;i++){
				var player:PlayerView=members[i];
				player.myVo.isEnd=true;
				player.moveRight();
			}
		}
		

		

	}
}